const {
  defineConfig
} = require('@vue/cli-service')
// const AutoImport = require('unplugin-auto-import/webpack')
// const Components = require('unplugin-vue-components/webpack')
// const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
const vueSSRClientPlugin = require("vue-server-renderer/client-plugin");

module.exports = defineConfig({
  transpileDependencies: true,
  // plugins: [
  //   AutoImport({
  //     resolvers: [ElementPlusResolver()],
  //   }),
  //   Components({
  //     resolvers: [ElementPlusResolver()],
  //   }),
  // ],
  configureWebpack: {
    externals: ['AMap']
  },
  
  devServer: {
    host: '0.0.0.0',
    port: 9001,
    open: true, //vue项目启动时自动打开浏览器
    proxy: {
      '/api': {
        target: 'http://192.168.101.17:5210', //接口域名
        changeOrigin: true, //是否跨域
        // ws: true, //是否代理 websockets
        secure: false, //是否https接口
        pathRewrite: { //路径重置
          '^/api': ''
        }
      }
    }
  }
})